package com.hd.service.impl;

import com.hd.mapper.InstrResultInfoMapper;
import com.hd.mapper.ReservationInstrMapper;
import com.hd.pojo.InstrResultInfo;
import com.hd.pojo.ReservationInstr;
import com.hd.service.InstrResultInfoService;
import com.hd.service.ReservationInstrService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by 1 on 2017/12/1.
 */
@Service("instrResultInfoService")
@Transactional
public class InstrResultInfoServiceImpl implements InstrResultInfoService {

    @Resource
    private InstrResultInfoMapper instrResultInfoMapper;

    @Resource
    private ReservationInstrMapper reservationInstrMapper;

    @Override
    public void addInstrResultInfo(InstrResultInfo instrResultInfo) {
        instrResultInfoMapper.add(instrResultInfo);
       reservationInstrMapper.updateReservationInstr(instrResultInfo.getReserveInstrId());
    }
}
